using OFX.Aggregator.Infrastructure;

namespace OFX.Aggregator.WpfApplication
{
	public class ProgressReportBridge : IProgressReport
	{
		private IProgressReport progressReport;

		#region Implementation of IProgressReport

		public void OnProgress(double currentStep, double totalSteps)
		{
			this.progressReport.OnProgress(currentStep, totalSteps);
		}

		public void OnFinish()
		{
			this.progressReport.OnFinish();

			SetPage(null);
		}

		#endregion

		public void SetPage(IProgressReport page)
		{
			this.progressReport = page;
		}
	}
}